﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TinTucTieuDiem.ascx.cs" Inherits="WebHousingInfo.Controls.TinTucTieuDiem" %>
<div id="noithat_200">
<% var objectTTTieuDiem = HousingInfo.Library.NewsBOList.GetNewsBOList_ByNoiThat(27,5);
   int idcate = -1; %>
    <div class="title">TIN TỨC TIÊU ĐIỂM</div>
    <div class="content">
    <% foreach (var objectTTTieuDiem_Detail in objectTTTieuDiem)
       {
           idcate = Convert.ToInt32(objectTTTieuDiem_Detail.CategoryID); %>       
        <div class="data">
            <% if (objectTTTieuDiem_Detail.UrlImage != "")
                {
                    if (checkurlimage(objectTTTieuDiem_Detail.UrlImage) == true)
                    {
                        string url = "TotalUpload/ImagesTotal/" + objectTTTieuDiem_Detail.UrlImage;                                                                                        
                         %><a href="ChiTietKhongGianSong.aspx?idkgs=<%=objectTTTieuDiem_Detail.NewsID %>&cate=<%=objectTTTieuDiem_Detail.CategoryID %>"><img src="<%=url %>" width="80" height="70" border="0" align="left" /></a>
                         <% }
                    else
                    { %><a href="ChiTietKhongGianSong.aspx?idkgs=<%=objectTTTieuDiem_Detail.NewsID %>&cate=<%=objectTTTieuDiem_Detail.CategoryID %>"><img src="TotalUpload/ImagesTotal/noimage.gif" width="80" height="70" border="0" align="left" /></a>
                    <% }
                }
                else
                { %>
                    <a href="ChiTietKhongGianSong.aspx?idkgs=<%=objectTTTieuDiem_Detail.NewsID %>&cate=<%=objectTTTieuDiem_Detail.CategoryID %>"><img src="TotalUpload/ImagesTotal/noimage.gif" width="80" height="70" border="0" align="left" /></a>
                <%} %>
	        <p style="text-align:justify; font-weight:normal;"><a href="#"><%=objectTTTieuDiem_Detail.Title%></a></p>
	       
        <% if (objectTTTieuDiem_Detail.NewsContent.Length > 90)
           { %>
         <%=objectTTTieuDiem_Detail.NewsContent.Substring(0, 89)%> ...
        <%}
           else
           { %>
        <%=objectTTTieuDiem_Detail.NewsContent%>
        <%} %>
        
        </div>
        <div class="line"></div>
        <%} %>
    </div>
    <% if (idcate == -1)
       { %>
    <div class="footer"><a href="#">Xem thêm</a></div>
    <%}
       else
       { %>
            <div class="footer"><a href="XemThemTinTuc.aspx?idcate=<%=idcate %>">Xem thêm</a></div>
    <%} %>
</div>